package com.dxyxx.pojo;

import java.io.Serializable;
import java.util.Date;
import java.util.Set;

import org.codehaus.jackson.annotate.JsonIgnore;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;

@JsonIgnoreProperties(ignoreUnknown = true)
public class Order implements Serializable {
	//自提时间，1 0 2 取值
	private int bufferInterval;
	/** 付款时间 */
	private Date dealTime;
	/** 下单时的备注 */
	private String description;

	/** 折扣 */
	private Double discount;

	/** 对应的 团类型 */
	private Group group;;
	/**
	 * 对应的团实例
	 */

	private GroupInstance groupInstance;

	/** 主键 */
	private long id;

	/** 是否自提 */
	private Boolean isBuffet;

	/***/
	private Boolean isCancel;

	/** 是否付款 */
	private Boolean isPay;

	private double money;

	/** 订单详细(每个订单详细即为某个产品,数量,价格等) */
	// 设置 ：级联 保存/新建 操作 。新建 订单 的时候，保存新建的订单那么新建的 item也同时被保存

	private Set<OrderDetail> orderDetails;

	private OrderProp orderProp;

	private String payType;

	/** 下单时间 */
	private Date postTime;

	/** 下单的用户 */
	private User user;

	private String uuid;

	public int getBufferInterval() {
		return bufferInterval;
	}

	public Date getDealTime() {
		return dealTime;
	}

	public String getDescription() {
		return description;
	}

	public Double getDiscount() {
		return discount;
	}

	public Group getGroup() {
		return group;
	}

	public GroupInstance getGroupInstance() {
		return groupInstance;
	}

	public Long getId() {
		return id;
	}

	public Boolean getIsBuffet() {
		return isBuffet;
	}

	public Boolean getIsCancel() {
		return isCancel;
	}

	public Boolean getIsPay() {
		return isPay;
	}

	public double getMoney() {
		return money;
	}

	public Set<OrderDetail> getOrderDetails() {
		return orderDetails;
	}

	public OrderProp getOrderProp() {
		return orderProp;
	}

	public String getPayType() {
		return payType;
	}

	public Date getPostTime() {
		return postTime;
	}

	public User getUser() {
		return user;
	}

	public String getUuid() {
		return uuid;
	}

	public void setBufferInterval(int bufferInterval) {
		this.bufferInterval = bufferInterval;
	}

	public void setDealTime(Date dealTime) {
		this.dealTime = dealTime;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public void setDiscount(Double discount) {
		this.discount = discount;
	}

	public void setGroup(Group group) {
		this.group = group;
	}

	public void setGroupInstance(GroupInstance groupInstance) {
		this.groupInstance = groupInstance;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public void setIsBuffet(Boolean isBuffet) {
		this.isBuffet = isBuffet;
	}

	public void setIsCancel(Boolean isCancel) {
		this.isCancel = isCancel;
	}

	public void setIsPay(Boolean isPay) {
		this.isPay = isPay;
	}

	public void setMoney(double money) {
		this.money = money;
	}

	// @OneToMany(cascade = { CascadeType.REFRESH, CascadeType.PERSIST,
	// CascadeType.MERGE, CascadeType.REMOVE }, fetch = FetchType.LAZY, mappedBy
	// = "order")
	public void setOrderDetails(Set<OrderDetail> orderDetails) {
		this.orderDetails = orderDetails;
	}

	public void setOrderProp(OrderProp orderProp) {
		this.orderProp = orderProp;
	}

	public void setPayType(String payType) {
		this.payType = payType;
	}

	public void setPostTime(Date postTime) {
		this.postTime = postTime;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public void setUuid(String uuid) {
		this.uuid = uuid;
	}

}
